package day06;

import sun.util.resources.cldr.kea.TimeZoneNames_kea;

import javax.xml.bind.SchemaOutputResolver;
import java.security.PublicKey;

public class MethodDemo {
    public static void main(String[] args) {
        sayHi("zhangsan", 63);
        double a = getNum();
        System.out.println(a);
        int c = plus(1, 6);
        System.out.println(c);

        int[] d = eat(10, 100);
        System.out.println("素组长度：" + d.length);
        int[] e = eat(12, 1);
        sayHello("a", 12);

        aMethod();
        System.out.println(444);


    }

    //public  static  void say(){
    // System.out.println("牛");

    /*public static  void  sayHi(String name,int ages){
        sayHi("张三",66);
    }

    public static void sayHi(String name) {
       // say();
       // System.out.println("马");
        System.out.println("大家好,我叫"+name+",今年"+ages+"岁了。");


    }*/


    public static void sayHi(String name) {
        sayHi("zhan", 63);
        System.out.println("");
    }

    public static void sayHi(String name, int age) {
        System.out.println("我今年" + age + "wojiao" + name + "。");
    }

    public static double getNum() {
        return 8.88;
    }

    public static int plus(int num1, int num2) {
        int num = num1 + num2;
        return num;
    }

    public static int[] eat(int len, int max) {
        int[] arr = new int[10];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) (Math.random() * 100);
        }

        return arr;
    }

    public static void sayHello(String name, int age) {
        if (age > 60) {

            System.out.println("");
            return;
        }
    }
        public static void aMethod () {
            System.out.println(123);
            bMethod();
            System.out.println(213);
        }
        public static void bMethod () {

        System.out.println(333);

        }


    }



